#include <iostream>
#include <string>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	int i = 1;
	char hash[27] = { 0 };
	for (char ch = 'A'; ch <= 'Z'; ch++)
	{
		hash[i++] = ch;
	}
	string s;

	while (n)
	{
		if (n < 27)
		{
			s += hash[n % 27];
			n /= 27;
		}
		else
		{
			s += hash[n % 26];
			n /= 26;
		}
	}
	reverse(s.begin(), s.end());
	cout << s << endl;
	return 0;
}